home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
util
/
wb
/
RndBdrop.lha
/
Readme.txt
< prev
next >
Wrap
Text File
|
1997-10-18
|
3KB
|
70 lines
Random Backdrop (RandBackdrop) Program
Function: The program makes a random selection from a number of .iff files for
the WB backdrop picture selected by Preferences.
Purpose: I like pretty pictures, but I get sick of changing them with Preferences.
This program makes Preferences show a different picture after each reboot.
How it works: The program copies the selected file into T: under the (fixed)
filename "Backdrop.iff". Preferences is set to look in T: for that filename.
Requirements: WB 3.x only.
Program size: 14 kb
File size: 20 kb
To be automatic, program must be run within startup sequence before WB is
loaded.
Machine used for creation and debugging: A4000 + Cyberstorm 060/50 + WB
3.1 + 144 MB.
How to run: (CLI only)
Type "RandBackdrop <directory> <number of files>", where
RandBackdrop is the name of the program (case is unimportant);
<directory> is the directory containing your backdrop files;
<number of files> is the number of files in your directory.
What you have to do:
1. Add RandBackdrop to C: or some other suitable place that can be
reached during the startup sequence.
2. Make up a directory of your favourite backdrop pictures (.iff). They must
have names such as "PIXyyy.iff", where yyy is a number from 001 to 999, with
leading zeroes.
3. Add the command "RandBackdrop <directory> <number files>" to
either s:Startup-Sequence or s:User-Startup. The new command must be after the
RAM: directory T: is created, and before the LoadWB command.
4. Go into Preferences and set WBPattern to "Picture". Choose the picture
"T:Backdrop.iff" (There won't be one there until you have run RandBackdrop).
Notes: The program uses the Rand() function to generate a random filename
between pix001.iff and pixyyy.iff inclusive, where yyy is the "number of files"
specified on the command line. It looks up the filename to check it exists, and then
uses the Execute library function which calls Copy to copy the file. The original file
is untouched. I like to leave my files write-protected when I can.
Built-in checks:
1. Filename is checked for existence before calling Copy (Copy crashes if it isn't
there).
Bugs:
1. If the destination file is already in T:, this program can't delete it (it's
probably been opened by Preferences and can't be deleted). Make sure that
"T:Backdrop.iff" does not exist when RandBackdrop is called.
2. RandBackdrop performs no checking on the file - it merely copies it to T: If
the contents are garbage, Preferences might crash.
Modifying:
I have included the source, since it's so simple and represents only a couple
of hours' work. I used SAS/C version 6.55 to compile it. I haven't included any
pictures, since all mine have been scanned from calendars and are copyrighted.
Payment: None. Feel free to use this program as you see fit. An E-mail to
awyatt@matra.com.au would be appreciated.
Disclaimer: You load or use this program at your own risk. If it crashes and destroys
all your investment data, don't call me.
Tony Wyatt
18th October 1997